package lab02.Test30;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        float[] score;
        float sum=0;
        int i;
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入要计算平均成绩的人数");
        int a=scanner.nextInt();
        score= new float[a];
        for (i=0;i<a;i++);{
            System.out.println("请输入第"+(i+1) +"个人成绩：");
            score[i]= scanner.nextFloat();
            sum=sum+score[i];

        }
        System.out.println("平均成绩："+sum/a);
    }
}
